/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package chapter5.creational.singletonpattern;

/**
 *
 * @author ASUS
 */
public class SingletonExample {
    private static SingletonExample single = null;
    
    private SingletonExample()
    {
    }
    
    public static SingletonExample getInstance()
    {
        if(single == null)
        {
            single = new SingletonExample();
        }
        
        return single;
    }
    
    public void sayHello()
    {
        System.out.println("Hello");
    }
}
